// 全局共享数据示例
import { DEFAULT_NAME } from '@/constants';
import { useState } from 'react';

type User = {
  appId: number;
  areaId: number;
  inputUserId: string;
  isNeedFullInfo: number;
  nextAction: number;
  sndaId: string;
  ticket: string;
};

const useUser = () => {
  const [name, setName] = useState<string>(DEFAULT_NAME);
  const [userInfo, setUserInfo] = useState<User>();

  return {
    name,
    setName,
    userInfo,
    setUserInfo,
  };
};

export default useUser;
